package com.core.service.impl;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.core.dao.GenericDao;
import com.core.dao.SekolahDao;
import com.core.entity.FasilitasSekolah;
import com.core.entity.Kelulusan;
import com.core.entity.Sekolah;
import com.core.service.SekolahService;
import com.google.gwt.user.client.rpc.core.java.util.Collections;

@Service
public class SekolahServiceImpl extends GenericServiceImpl<Sekolah, Long>
		implements SekolahService, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3622055027544863668L;
	@Autowired
	private SekolahDao sekolahDao;

	@Override
	public GenericDao<Sekolah, Long> getDao() {
		// TODO Auto-generated method stub
		return sekolahDao;
	}

	@Override
	@Transactional(readOnly = true)
	public List<Sekolah> findAll() {
		// TODO Auto-generated method stub
		return super.findAll();
	}

	@Override
	@Transactional
	public Long save(Sekolah entity) throws Exception {
		Long id = super.save(entity);
		return id;
	}

	@Override
	public List<Sekolah> search(Map<String, List<Object>> param) {
		// TODO Auto-generated method stub
		return sekolahDao.search(param);

	}

}
